<template>
    <el-table :data="entryList" v-el-table-infinite-scroll="() => { emits('getEntryList1') }"
        @selection-change="(val) => { emits('SelectionMethod1', val) }" style="width: 100%;border-radius: 10px;"
        height="86.5vh">
        <el-table-column type="selection" width="30" />
        <el-table-column prop="ReceiveTime" label="Date" width="200" />
        <el-table-column prop="PI_name" label="Name" width="180" />
        <el-table-column prop="user_name" label="SalesName" width="110" />
        <el-table-column prop="create_name" label="CreatName" width="120" />
        <el-table-column prop="process_text" label="Process" width="110" />
        <el-table-column prop="Current" label="Currency" width="120" />
        <el-table-column prop="Amount" label="Amount" width="110" />
        <el-table-column prop="config_short" label="Bank" width="160" />
        <el-table-column prop="comments" label="Comment" width="120" />
        <el-table-column prop="gross" label="Gross" width="120" />
        <el-table-column prop="fee" label="Fee" width="120" />
        <el-table-column prop="net" label="Net" width="120" />
        <el-table-column align="center" label="Actions" fixed="right" width="180">
            <template v-slot="operation">
                <div class="flex aic jc-sa">
                    <el-button @click="() => { emits('payEdit', operation) }" plain
                        style="width: 40%;height: 30px;">Edit</el-button>
                    <el-popconfirm confirm-button-text="Yes" cancel-button-text="No" :icon="InfoFilled" icon-color="#626AEF"
                        title="Are you sure you want to review this record?" @confirm="() => { emits('audit', operation) }"
                        @cancel="() => { emits('cancelEvent', 'Audit cancellation') }">
                        <template #reference>
                            <el-button style="width: 40%;height: 30px;background-color:#6193D2;color: #fff;border: none;"
                                type="danger">Audit</el-button>
                        </template>
                    </el-popconfirm>
                </div>

            </template>
        </el-table-column>
    </el-table>
</template>

<script setup>
const props = defineProps({
    entryList: Object
})
const emits = defineEmits(['getEntryList1', 'payEdit', 'SelectionMethod1', 'audit', 'cancelEvent'])
</script>
<style>
.el-table .cell {
    font-weight: normal;
}
</style>